/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

import java.math.BigDecimal;

/**
 * 税率设置Entity
 * @author HOHD
 * @version 2020-12-24
 */
@Table(name="st_tax_rate_setting", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="name", attrName="name", label="税率名称", queryType=QueryType.LIKE),
		@Column(name="code", attrName="code", label="税率编码"),
		@Column(name="rate", attrName="rate", label="税率"),
		@Column(name="appreciation", attrName="appreciation", label="增值税"),
		@Column(name="default_value", attrName="defaultValue", label="默认值"),
		@Column(name="effect", attrName="effect", label="有效"),
		@Column(name="sort_number", attrName="sortNumber", label="排序"),
	}, orderBy="a.id DESC"
)
public class StTaxRateSetting extends DataEntity<StTaxRateSetting> {
	
	private static final long serialVersionUID = 1L;
	private String name;		// 税率名称
	private String code;		// 税率编码
	private BigDecimal rate;		// 税率
	private Integer appreciation;		// 增值税
	private Integer defaultValue;		// 默认值
	private Integer effect;		// 有效
	private Integer sortNumber;		// 排序
	
	public StTaxRateSetting() {
		this(null);
	}

	public StTaxRateSetting(String id){
		super(id);
	}
	
	@Length(min=0, max=20, message="税率名称长度不能超过 20 个字符")
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=20, message="税率编码长度不能超过 20 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	public BigDecimal getRate() {
		return rate;
	}

	public void setRate(BigDecimal rate) {
		this.rate = rate;
	}
	
	public Integer getAppreciation() {
		return appreciation;
	}

	public void setAppreciation(Integer appreciation) {
		this.appreciation = appreciation;
	}
	
	public Integer getDefaultValue() {
		return defaultValue;
	}

	public void setDefaultValue(Integer defaultValue) {
		this.defaultValue = defaultValue;
	}
	
	public Integer getEffect() {
		return effect;
	}

	public void setEffect(Integer effect) {
		this.effect = effect;
	}
	
	public Integer getSortNumber() {
		return sortNumber;
	}

	public void setSortNumber(Integer sortNumber) {
		this.sortNumber = sortNumber;
	}
	
}